import Vue from 'vue'
import Router from 'vue-router'
import backIndex from '@/components/back/index'
import testmock from '@/components/back/testmock'
import user from '@/components/front/user'
import expert from '@/components/back/expert'
import programme from '@/components/back/programme'
import expertActivityRecords from '@/components/back/expertActivityRecords'
import typeOfCompetitionDetails from '@/components/back/typeOfCompetitionDetails'
import bookmaker from '@/components/back/bookmaker'
import matchType from '@/components/back/matchType'
import MatchOddsRecord from '@/components/back/MatchOddsRecord'
import frontbookmaker from '@/components/front/bookmaker'
import frontmatchType from '@/components/front/matchType'
import frontmatchOddsRecord from '@/components/front/matchOddsRecord'

import gameDetailsRecord from '@/components/back/gameDetailsRecord'
import index from '@/components/front'
import userSchemeRecord from '@/components/back/userSchemeRecord'
import backEventRecords from '@/components/back/liveadmin/eventRecordsIndex'
import backActivityType from '@/components/back/liveadmin/activityTypeIndex'
import backCompetitionRecord from '@/components/back/liveadmin/competitionRecordIndex'

import cooperation from '@/components/front/public/cooperation'


Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [

    // {
    //   path: '/userSchemeRecord',
    //   name: 'userSchemeRecord',
    //   component: userSchemeRecord
    // },
    {
      path: '/back',
      name: 'backIndex',
      component: backIndex
    },
    {
      path: '/cooperation',
      name: 'cooperation',
      component: cooperation
    },

    {
      path: '/',
      name: 'index',
      component: index
    },

    {
      path: '/front/user',
      name: 'user',
      component: user
    },
    {
      path: '/expert',
      name: 'expert',
      component: expert
    },
    {
      path: '/programme',
      name: 'programme',
      component: programme
    },
    {
      path: '/expertActivityRecords',
      name: 'expertActivityRecords',
      component: expertActivityRecords
    },
    {
      path: '/typeOfCompetitionDetails',
      name: 'typeOfCompetitionDetails',
      component: typeOfCompetitionDetails
    },

    {
      path: '/gameDetailsRecord',
      name: 'gameDetailsRecord',
      component: gameDetailsRecord
    },

    {
      path: '/front/bookmaker',
      name: 'frontbookmaker',
      component: frontbookmaker
    },
    {
      path: '/front/matchType',
      name: 'frontmatchType',
      component: frontmatchType
    },
    {
      path: '/front/matchOddsRecord',
      name: 'frontmatchOddsRecord',
      component: frontmatchOddsRecord
    },



    {
      path: '/back',
      name: 'backIndex',
      component: backIndex,
      children:[
        {
        path: "/back/liveAdmin/eventRecords",
          name : "backLiveAdminEventRecords",
          component : backEventRecords
      }
      ]
    },
    {
      path: '/back',
      name: 'backIndex',
      component: backIndex,
      children:[
        {
          path: "/back/liveAdmin/competitionRecord",
          name : "backLiveAdminCompetitionRecord",
          component : backCompetitionRecord
        }
      ]
    },
    {
      path: '/back',
      name: 'backIndex',
      component: backIndex,
      children:[
        {
          path: "/back/liveAdmin/activityType",
          name : "backLiveAdminActivityType",
          component : backActivityType
        }
      ]
    },

    // {
    //   path: '/back/user',
    //   name: 'backuser',
    //   component: backuser
    // },
    {
      path: '/testmock',
      name: 'testmock',
      component: testmock
    },
    {
      path: '/back',
      name: 'backIndex',
      component: backIndex,
      children: [
        {
          path: 'user',
          component: resolve => require(['@/components/back/user/'], resolve),
          meta: {title: '用户管理'},
        },
        {
          path: 'userSchemeRecord',
          component: resolve => require(['@/components/back/userSchemeRecord/'], resolve),
          meta: {title: '用户订单管理'},
        },
        // {
        //   path: 'memberType',
        //   component: resolve => require(['@/components/back/memberType/'], resolve),
        //   meta: {title: '会员类型管理'},
        // },
        // {
        //   path: 'integral',
        //   component: resolve => require(['@/components/back/integral/'], resolve),
        //   meta: {title: '会员类型管理'},
        // },

        {
          path: '/back/liveAdmin',
          component: resolve => require(['@/components/back/liveAdmin'], resolve),
          meta: {title: "直播管理员管理"}
        },


        {
          path: '/back/expert',
          component: resolve => require(['@/components/back/expert'], resolve),
          meta: {title: "专家管理"}
        },
        {
          path: '/back/gameDetailsRecord',
          component: resolve => require(['@/components/back/gameDetailsRecord'], resolve),
          meta: {title: "比赛详情管理"}
        },
        {
          path: '/back/programme',
          component: resolve => require(['@/components/back/programme'], resolve),
          meta: {title: "方案管理"}
        },
        {
          path: '/back/typeOfCompetitionDetails',
          component: resolve => require(['@/components/back/typeOfCompetitionDetails'], resolve),
          meta: {title: "比赛详情管理"}
        },{
          path: 'bookmaker',
          component: resolve => require(['@/components/back/bookmaker/'], resolve),
          meta: {title: '博彩公司管理'},
        },
        {
          path: 'matchType',
          component: resolve => require(['@/components/back/matchType/'], resolve),
          meta: {title: '比赛类型管理'},
        },
        {
          path: 'MatchOddsRecord',
          component: resolve => require(['@/components/back/MatchOddsRecord/'], resolve),
          meta: {title: '比赛赔率记录管理'},
        }

      ]
    },
  ]
})
